/*
 * @Author: XuYang 
 * @Date: 2021-05-17 17:01:33 
 * @Last Modified by: XuYang
 * @Last Modified time: 2021-05-17 17:03:44
 */
import {
    Provide,
   } from '@midwayjs/decorator';
import { InjectEntityModel } from '@midwayjs/orm';
import { Role } from '../entity/role';
import { Repository } from 'typeorm';

@Provide()
export class RoleService {
    @InjectEntityModel(Role)
    RoleModel: Repository<Role>;
    /**
     * 获取所有的角色
     */
    async getAllRole( ){
       let list = await this.RoleModel.find();
       return list; 
    }
}